import { useNavigate } from 'react-router-dom';
import styles from './index.module.scss';

export default function NotFoundPage() {
  const navigate = useNavigate();

  const handleBackHome = () => {
    navigate('/');
  };

  return (
    <div className={styles.notFoundContainer}>
      <div className={styles.notFoundContent}>
        <h1 className={styles.notFoundTitle}>404</h1>
        <p className={styles.notFoundText}>抱歉，您访问的页面不存在</p>
        <button className={styles.backHomeButton} onClick={handleBackHome}>
          返回首页
        </button>
      </div>
    </div>
  );
}